package com.rany.day07.demo03;

import java.util.ArrayList;
import java.util.Iterator;

public class ETest {
    public static void main(String[] args) {
        demo01();
    }

    private static void demo01() {
        ArrayList list = new ArrayList();
        list.add("nihao");
        list.add(23);
        Iterator iterator = list.iterator();
        while (iterator.hasNext()){
            Object next = iterator.next();
            System.out.println(next);
            String str = (String) next;
            System.out.println(str.length());
        }
    }
}
